package com.liumuxian.video.dao;

import com.liumuxian.video.pojo.Resource;
import org.springframework.data.jpa.repository.*;
import java.util.*;

public interface ResourceDao extends JpaRepository<Resource,String>, JpaSpecificationExecutor<Resource> {
    @Modifying
    @Query(value = "update tb_resource set name=?1,state=?2,creatdata=?3,updatedate=?4 where id=?5",nativeQuery = true)
    void update(String name,Integer state,Date creatdata,Date updatedate,String rid);
    List<Resource> findAllByState(Integer state);
}
